<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
<title>我的帖子-论坛-城建就业指导网</title>
<link href="${rc.contextPath}/css/page.css" rel="stylesheet">
<link href="${rc.contextPath}/css/style.css" rel="stylesheet">
<script src="${rc.contextPath}/js/jquery.1.10.1.min.js"></script>
<script type="text/javascript" src="${rc.contextPath}/js/jquery.lib.min.js"></script>
<script src="${rc.contextPath}/bootstrap/js/bootstrap.min.js"></script>
<!-- Bootstrap -->
<link href="${rc.contextPath}/bootstrap/css/bootstrap.css" rel="stylesheet">
<style type="text/css">
	body{
		background-color: #eaeaea;
	}
	.forum-title{
		color: #0092EF;
		text-decoration: none;
	}
	.username a{
		color: #2d64b3;
    	text-decoration: none;
	}
	.content > ul >li:hover{
		background-color: #EAEAE8;
	}
</style>
</head>
<body>
	
	<!--   nav     -->
		#parse("header.html")
	
	<div id="container">
		
		<!--  左侧个人中心 -->
		<div class="sidebar" >
			<div class="panel">
				<div class="panel-heading">
					<h4 class="panel-title"><b>我在论坛</b></h4>
				</div>
				<div class="panel-body">
					<a href="#">
						<img class="img-thumbnail" src="http://127.0.0.1:8080/image/portrait/$!curr_user.portrait" width="40px"/>
					</a>
					<div>
						<div class="username">用户名：<a href="#">$!{curr_user.nickname}</a></div>
						<div class="user-auth">用户组：普通用户</div>
					</div>
					<div class="clearfix"></div>
					<div class="list-group">
						<a class="list-group-item"  style="border: 0px;" href="${rc.contextPath}/forum/mymessage/1">
							<span class="glyphicon glyphicon-envelope"></span>&nbsp;消息
							<span class="badge" id="unLookMessageCount">0</span>
						</a>
						<a class="list-group-item"  style="border: 0px;" href="${rc.contextPath}/forum/mypostlist/1">
							<span class="glyphicon glyphicon-book"></span>&nbsp;我的帖子
						</a>
						<a class="list-group-item"  style="border: 0px;" href="${rc.contextPath}/user/collection/post/1">
							<span class="glyphicon glyphicon-bookmark"></span>&nbsp;我的收藏
						</a>
					</div>
					
					<a type="button" class="btn btn-primary btn-lg btn-block" href="${rc.contextPath}/forum/list/1#fabuform">
						<span class="glyphicon glyphicon-edit"></span>&nbsp;快速发帖
					</a>
					<table class="table">
						<tr>
							<td>精品帖子
								<br/>
								&nbsp;10
							</td>
							<td><a href="${rc.contextPath}/forum/list/1">所有帖子</a><br/></td>
						</tr>
					</table>
					
				</div>
			</div>
		</div>
		
		<!--  右侧帖子列表   -->
		<div class="content" >
			
			<div style="margin-bottom: 30px;">
				我的帖子
			</div>
			
			<ul class="list-group">
			
				#foreach($!forumPost in $!mypostlist)
				<li class="list-group-item">
					<h4 class="list-group-item-heading">
						<span class="glyphicon glyphicon-eye-open text-muted">20</span>
						<span class="forum-title"><a href="${rc.contextPath}/forum/detail/$!{forumPost.id}/1">$!forumPost.post_title</a></span>
						<span class="pull-right text-muted">
							<span class="glyphicon glyphicon-user post-starter">$!forumPost.post_starter.nickname</span>
						</span>
					</h4>
					<div class="list-group-item-text text-muted">
						$!forumPost.post_content
						<span class="pull-right text-muted">$!forumPost.gmt_modified</span>
					</div>
				</li>
				#end
				
			</ul>
			
			<div class="pagination" style="margin: 0px 0 20px;">$!page.pageString</div>
			
			
			
		</div>
		
	</div>
	
	
	<a id="backtop" title="回到顶部" rel="nofollow"></a>
	<script type="text/javascript" src="${rc.contextPath}/js/core.min.js"></script>
	
	
</body>
<script type="text/javascript">


$(document)
.on(
		"click",
		".pagination a",
		function(e) {
			var pageNum = $(this).attr("pageData");
			if (pageNum == 0 || isNaN(pageNum)) {
				return;
			}
			
			window.location.href = "${rc.contextPath}/forum/mypostlist/"+ pageNum ;
		});
		
$(function(){
	jQuery.getJSON('${rc.contextPath}/forum/getUnLookMessageCount',function(data){
		if(data!=0){
			$("#unLookMessageCount").html(data);
		}
	})
});			

</script>

</html>